package com.jxpanda.spring.module.wechat.component.http.base.request.query;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Builder;
import lombok.Getter;
import lombok.RequiredArgsConstructor;

/**
 * @author Panda
 */
public class OpenPlatformQuery {

    @Getter
    @Builder
    @RequiredArgsConstructor
    public static final class AccessToken {
        @JsonProperty("appid")
        private final String appId;
        @JsonProperty("secret")
        private final String secret;
        @JsonProperty("code")
        private final String code;
        @JsonProperty("grant_type")
        private final String grantType = "authorization_code";
    }

    @Getter
    @Builder
    @RequiredArgsConstructor
    public static final class RefreshToken {
        @JsonProperty("appid")
        private final String appId;
        @JsonProperty("refresh_token")
        private final String refreshToken;
        @JsonProperty("grant_type")
        private final String grantType = "refresh_token";
    }

    @Getter
    @RequiredArgsConstructor
    public static final class UserInfo {
        @JsonProperty("access_token")
        private final String accessToken;
        @JsonProperty("openid")
        private final String openId;
    }

}
